SummaryFunction (x)

Basic and Crystal syntax.

Arguments

x is an array of values that can be evaluated by the function being used.

Returns

Fractional Number

Action

SummaryFunction (x) summarizes the values in an array of constants, data field values, or formulas (a*b, c/d, etc.) separated by commas.

Typical uses

Use any time you want to summarize two or more values.

Examples

The following examples are applicable to Crystal syntax:

Note:    Use the Array (x,...) function to create the arrays instead of square brackets to make Basic syntax examples.

SummaryFunction([25,50,75,100])

Summarizes the values in an array of constants.

SummaryFunction([{file.PERIOD 8}, {file.PERIOD 9}, {file.PERIOD 10}])

Summarizes the values in an array of field values.

Average ([10,12,32,48])

Calculates the average of the values in an array of constants.

Count([1,2,3,4,5])

Returns 5. Counts the total number of values in the array.

DistinctCount([1,3,5,3,2,5])

Returns 4. Counts the number of distinct values in the array. Duplicate values are ignored.

Variance([{file.QTY1}, {file.QTY2}, {file.QTY3}, {file.QTY4}])

Returns 17.00 where Qty1 = 2, Qty2 = 2, Qty3 = 10, and Qty4 = 8.



Seagate Software IMG Holdings, Inc.
http://www.seagatesoftware.com
Support services:
http://support.seagatesoftware.com